package com.example.SpringIoCpractice;//TODO

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("hello.xml"); //获取beans.xml配置文件
        HelloWorld helloWorld = (HelloWorld) context.getBean("helloWorld");//通过id获取bean对象
        helloWorld.setHello("hello World!");
        helloWorld.getHello();

    }
}